package org.feng.config;

import io.r2dbc.spi.ConnectionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.r2dbc.core.R2dbcEntityTemplate;

/**
 * R2dbcEntityTemplate 的配置：增强查询功能，有排序、分页、多条件查询等
 *
 * @version v1.0
 * @author: fengjinsong
 * @date: 2022年06月15日 22时13分
 */
@Configuration
public class R2dbcTemplateConfig {
    @Bean
    public R2dbcEntityTemplate r2dbcEntityTemplate(ConnectionFactory connectionFactory) {
        return new R2dbcEntityTemplate(connectionFactory);
    }
}
